#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    //给按钮设置相关的图标
    //1.创建图标对象
    QIcon icon(":/18.png");
    //2.设置按钮图标
    ui->pushButton->setIcon(icon);
    //3.设置按钮图标的尺寸
    ui->pushButton->setIconSize(QSize(100,100));
}

Widget::~Widget()
{
    delete ui;
}

